package page.ineffable.photostorage.pojo;

import java.sql.Timestamp;

/**
 * 图片model
 *
 * @author lqs2
 * @date 2018/10/28, Sun
 */
public class Photo {
    /**
     * 唯一id
     */
    private String id;
    /**
     * 图像名
     */
    private String name;
    /**
     * 图像上传作者
     **/
    private String author;
    /**
     * 图像后缀
     **/
    private String suffix;
    /**
     * 图像存储路径
     **/
    private String storagePath;

    /**
     * 是否添加了图片水印
     */
    private boolean hasWaterMark;
    /**
     * 如果有水印，带水印的图像的存储路径
     **/
    private String markStoragePath;
    /**
     * 图片大小
     **/
    private long size;
    /**
     * 图片宽度
     */
    private int width;
    /**
     * 图片高度
     **/
    private int height;
    /**
     * 经度
     **/
    private double lon;
    /**
     * 维度
     **/
    private double lat;
    /**
     * 图片添加日期
     **/
    private Timestamp uploadDate;
    /**
     * 最后修改日期
     **/
    private Timestamp lastModDate;


    public Photo(String id, String name, String author) {
        this.id = id;
        this.name = name;
        this.author = author;
    }

    public Photo(String id, String name, String author, String suffix, String storagePath, boolean hasWaterMark,String markStoragePath, long size, int width, int height, double lon, double lat, Timestamp uploadDate, Timestamp lastModDate) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.suffix = suffix;
        this.storagePath = storagePath;
        this.markStoragePath = markStoragePath;
        this.hasWaterMark = hasWaterMark;
        this.size = size;
        this.width = width;
        this.height = height;
        this.lon = lon;
        this.lat = lat;
        this.uploadDate = uploadDate;
        this.lastModDate = lastModDate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public String getStoragePath() {
        return storagePath;
    }

    public void setStoragePath(String storagePath) {
        this.storagePath = storagePath;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public double getLon() {
        return lon;
    }

    public void setLon(double lon) {
        this.lon = lon;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public Timestamp getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(Timestamp uploadDate) {
        this.uploadDate = uploadDate;
    }

    public Timestamp getLastModDate() {
        return lastModDate;
    }

    public void setLastModDate(Timestamp lastModDate) {
        this.lastModDate = lastModDate;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public boolean isHasWaterMark() {
        return hasWaterMark;
    }

    public void setHasWaterMark(boolean hasWaterMark) {
        this.hasWaterMark = hasWaterMark;
    }

    public String getMarkStoragePath() {
        return markStoragePath;
    }

    public void setMarkStoragePath(String markStoragePath) {
        this.markStoragePath = markStoragePath;
    }

    @Override
    public String toString() {
        return "Photo{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", suffix='" + suffix + '\'' +
                ", storagePath='" + storagePath + '\'' +
                ", hasWaterMark=" + hasWaterMark +
                ", markStoragePath='" + markStoragePath + '\'' +
                ", size=" + size +
                ", width=" + width +
                ", height=" + height +
                ", lon=" + lon +
                ", lat=" + lat +
                ", uploadDate=" + uploadDate +
                ", lastModDate=" + lastModDate +
                '}';
    }
}
